if (!jsx3.lang.Class.forName("tibco.admin.enterpriseAssets.machines.search.ForInstallations")) {
    jsx3.Class.defineClass(
            "tibco.admin.enterpriseAssets.machines.search.ForInstallations", //the full name of the package to create
            jsx3.lang.Object, //  extends jsx3.lang.Object
            null, // does not implements any interfaces
            function(service) {          //name the argument of this function

                service.subscribeAll = function () {
                    tibco.admin.PubSub.subscribe(tibco.admin.enterpriseAssets.machines.search.EventID.ENABLE_CLOSE_SEARCH, service.enableCloseBtn)
                    tibco.admin.PubSub.subscribe(tibco.admin.enterpriseAssets.machines.search.EventID.DISABLE_CLOSE_SEARCH, service.disableCloseBtn)
                }

                service.disableCloseBtn = function() {
                    tibco.admin.Main.getServer().getJSXByName("btnClose21B").setEnabled(jsx3.gui.Form.STATEDISABLED, true)
                    tibco.admin.Main.getServer().getJSXByName("btnCloseSearchForInstallations").setEnabled(jsx3.gui.Form.STATEDISABLED, true)
                }
                service.enableCloseBtn = function() {
                    tibco.admin.Main.getServer().getJSXByName("btnClose21B").setEnabled(jsx3.gui.Form.STATEENABLED, true)
                    tibco.admin.Main.getServer().getJSXByName("btnCloseSearchForInstallations").setEnabled(jsx3.gui.Form.STATEENABLED, true)
                }
            });
}